package com.terrace.db.system.dao;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.terrace.db.system.mapper.entity.RolePermission;

public interface RolePermissionDao {

	public int deleteByRolePermissionId(String id);
	
	/**
	 * 批量删除指定角色的权限关联信息
	 * @param roleId
	 * @param permiIds
	 * @return
	 */
	public int batchDeleteRolePermissionByRoleId(@Param("roleId") String roleId, @Param("permiIds") List<String> permiIds);
	
	/**
	 * 批量保存角色权限关联信息
	 * @param roleId
	 * @param permiIds
	 * @return
	 */
	public int batchSaveRolePermission(@Param("roleId") String roleId, @Param("permiIds") List<String> permiIds);

	public int saveRolePermissionSelective(RolePermission rolePermission);

	public RolePermission selectByRolePermissionId(String id);

	public int updateByRolePermissionIdSelective(RolePermission rolePermission);

}